<form action="">
<div class="block">
	<span>日期:<input type="text" name="datei" id="datei" value="<?php echo $params['datei']?>"/><a href="javascript:NewCssCal('datei','yyyymmdd','arrow')"> [选择]</a></span>
	<span>idx：
		<select name="hostname_id">
			<option value=''>==不选==</option>
			<?php foreach($hostnames as $k=>$v){?>
        	    <option value="<?php echo $v['id'];?>" <?php if($params['hostname_id']==$v['id']){echo "selected";}?>><?php echo $v['hostname'];?></option>
        	<?php }?>
		</select>
	</span>
	<span>webapp：
		<select name="webapp_id">
			<option value=''>==不选==</option>
			<?php foreach($webapps as $k=>$v){?>
        	    <option value="<?php echo $v['id'];?>" <?php if($params['webapp_id']==$v['id']){echo "selected";}?>><?php echo $v['solrname'].$v['webapp'].':'.$v['port'];?></option>
        	<?php }?>
		</select>
	</span>
	<span>
		<input type="submit"/>
	</span>
</div>
</form>
<div>
    <table width="100%">
    	<tr class="tr_header">
    		<td>datei</td>
    		<td>idx</td>
    		<td>port</td>
    		<td>app</td>
    		<td>doc_number</td>
    		<td>avg_count_min</td>
    		<td>slow_min</td>
    		<td>max_count_min</td>
    	</tr>
    	<?php
    	if($report_list){
    	    $total_doc_number=0;
    	    $total_count=0;
    	    $total_slow=0;
    	    $total_max_count=0;
    	    foreach($report_list as $rlk=>$rlv){
    	        $total_doc_number+=$rlv['doc_number'];
    	        $total_count+=$rlv['count_min'];
                $total_slow+=$rlv['slow_min'];
                $total_max_count+=$rlv['max_count_min'];
    	?>
    	<tr class="<?php if($rlk%2==0){echo 'tr0';}else{echo 'tr1';}?>">
    		<td><?php echo $rlv['datei'];?></td>
    		<td><span style="color:<?php echo $hostnames[$rlv['hostname_id']]['color']?>"><?php echo $hostnames[$rlv['hostname_id']]['hostname']?></span></td>
    		<td><?php echo $webapps[$rlv['webapp_id']]['port']?></td>
    		<td><?php echo $webapps[$rlv['webapp_id']]['solrname'].$webapps[$rlv['webapp_id']]['webapp'].":".$webapps[$rlv['webapp_id']]['port']?></td>
    		<td><?php echo $rlv['doc_number'];?></td>
    		<td><?php echo $rlv['count_min'];?></td>
    		<td><?php echo $rlv['slow_min'];?></td>
    		<td><?php echo $rlv['max_count_min'];?></td>
    	</tr>
    	<?php }}?>
    	<tr class="tr_header">
    		<td colspan="4">total</td>
    		<td><?php echo $total_doc_number;?></td>
    		<td><?php echo $total_count;?></td>
    		<td><?php echo $total_slow;?></td>
    		<td><?php echo $total_max_count;?></td>
    	</tr>
    </table>
</div>
<div class="block">
	<span><?php echo $page_bar;?></span>
</div>